/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package seso;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *
 * @author Administrator
 */
@Entity
@Table(name = "ETOoHead", catalog = "M3ERP", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "ETOoHead.findAll", query = "SELECT e FROM ETOoHead e"),
    @NamedQuery(name = "ETOoHead.findByTransCoSeq", query = "SELECT e FROM ETOoHead e WHERE e.transCoSeq = :transCoSeq"),
    @NamedQuery(name = "ETOoHead.findByTransactionNo", query = "SELECT e FROM ETOoHead e WHERE e.transactionNo = :transactionNo"),
    @NamedQuery(name = "ETOoHead.findByTempCo", query = "SELECT e FROM ETOoHead e WHERE e.tempCo = :tempCo"),
    @NamedQuery(name = "ETOoHead.findByCoNo", query = "SELECT e FROM ETOoHead e WHERE e.coNo = :coNo"),
    @NamedQuery(name = "ETOoHead.findByCoType", query = "SELECT e FROM ETOoHead e WHERE e.coType = :coType"),
    @NamedQuery(name = "ETOoHead.findBySeason", query = "SELECT e FROM ETOoHead e WHERE e.season = :season"),
    @NamedQuery(name = "ETOoHead.findByLabel", query = "SELECT e FROM ETOoHead e WHERE e.label = :label"),
    @NamedQuery(name = "ETOoHead.findByFacility", query = "SELECT e FROM ETOoHead e WHERE e.facility = :facility"),
    @NamedQuery(name = "ETOoHead.findByCustomerCode", query = "SELECT e FROM ETOoHead e WHERE e.customerCode = :customerCode"),
    @NamedQuery(name = "ETOoHead.findByRvSubCustomerCode", query = "SELECT e FROM ETOoHead e WHERE e.rvSubCustomerCode = :rvSubCustomerCode"),
    @NamedQuery(name = "ETOoHead.findByOrderType", query = "SELECT e FROM ETOoHead e WHERE e.orderType = :orderType"),
    @NamedQuery(name = "ETOoHead.findByRvPoNo", query = "SELECT e FROM ETOoHead e WHERE e.rvPoNo = :rvPoNo"),
    @NamedQuery(name = "ETOoHead.findByRvDelivery", query = "SELECT e FROM ETOoHead e WHERE e.rvDelivery = :rvDelivery"),
    @NamedQuery(name = "ETOoHead.findByRvDelDateFrom", query = "SELECT e FROM ETOoHead e WHERE e.rvDelDateFrom = :rvDelDateFrom"),
    @NamedQuery(name = "ETOoHead.findByRvDelDateTo", query = "SELECT e FROM ETOoHead e WHERE e.rvDelDateTo = :rvDelDateTo")})
public class ETOoHead implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "TransCoSeq")
    private String transCoSeq;
    @Column(name = "TransactionNo")
    private String transactionNo;
    @Column(name = "TempCo")
    private String tempCo;
    @Column(name = "CoNo")
    private String coNo;
    @Column(name = "CoType")
    private String coType;
    @Column(name = "Season")
    private String season;
    @Column(name = "Label")
    private String label;
    @Column(name = "Facility")
    private String facility;
    @Column(name = "CustomerCode")
    private String customerCode;
    @Column(name = "RvSubCustomerCode")
    private String rvSubCustomerCode;
    @Column(name = "OrderType")
    private Character orderType;
    @Column(name = "RvPoNo")
    private String rvPoNo;
    @Column(name = "RvDelivery")
    private Character rvDelivery;
    @Column(name = "RvDelDateFrom")
    @Temporal(TemporalType.DATE)
    private Date rvDelDateFrom;
    @Column(name = "RvDelDateTo")
    @Temporal(TemporalType.DATE)
    private Date rvDelDateTo;

    public ETOoHead() {
    }

    public ETOoHead(String transCoSeq) {
        this.transCoSeq = transCoSeq;
    }

    public String getTransCoSeq() {
        return transCoSeq;
    }

    public void setTransCoSeq(String transCoSeq) {
        String oldTransCoSeq = this.transCoSeq;
        this.transCoSeq = transCoSeq;
        changeSupport.firePropertyChange("transCoSeq", oldTransCoSeq, transCoSeq);
    }

    public String getTransactionNo() {
        return transactionNo;
    }

    public void setTransactionNo(String transactionNo) {
        String oldTransactionNo = this.transactionNo;
        this.transactionNo = transactionNo;
        changeSupport.firePropertyChange("transactionNo", oldTransactionNo, transactionNo);
    }

    public String getTempCo() {
        return tempCo;
    }

    public void setTempCo(String tempCo) {
        String oldTempCo = this.tempCo;
        this.tempCo = tempCo;
        changeSupport.firePropertyChange("tempCo", oldTempCo, tempCo);
    }

    public String getCoNo() {
        return coNo;
    }

    public void setCoNo(String coNo) {
        String oldCoNo = this.coNo;
        this.coNo = coNo;
        changeSupport.firePropertyChange("coNo", oldCoNo, coNo);
    }

    public String getCoType() {
        return coType;
    }

    public void setCoType(String coType) {
        String oldCoType = this.coType;
        this.coType = coType;
        changeSupport.firePropertyChange("coType", oldCoType, coType);
    }

    public String getSeason() {
        return season;
    }

    public void setSeason(String season) {
        String oldSeason = this.season;
        this.season = season;
        changeSupport.firePropertyChange("season", oldSeason, season);
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        String oldLabel = this.label;
        this.label = label;
        changeSupport.firePropertyChange("label", oldLabel, label);
    }

    public String getFacility() {
        return facility;
    }

    public void setFacility(String facility) {
        String oldFacility = this.facility;
        this.facility = facility;
        changeSupport.firePropertyChange("facility", oldFacility, facility);
    }

    public String getCustomerCode() {
        return customerCode;
    }

    public void setCustomerCode(String customerCode) {
        String oldCustomerCode = this.customerCode;
        this.customerCode = customerCode;
        changeSupport.firePropertyChange("customerCode", oldCustomerCode, customerCode);
    }

    public String getRvSubCustomerCode() {
        return rvSubCustomerCode;
    }

    public void setRvSubCustomerCode(String rvSubCustomerCode) {
        String oldRvSubCustomerCode = this.rvSubCustomerCode;
        this.rvSubCustomerCode = rvSubCustomerCode;
        changeSupport.firePropertyChange("rvSubCustomerCode", oldRvSubCustomerCode, rvSubCustomerCode);
    }

    public Character getOrderType() {
        return orderType;
    }

    public void setOrderType(Character orderType) {
        Character oldOrderType = this.orderType;
        this.orderType = orderType;
        changeSupport.firePropertyChange("orderType", oldOrderType, orderType);
    }

    public String getRvPoNo() {
        return rvPoNo;
    }

    public void setRvPoNo(String rvPoNo) {
        String oldRvPoNo = this.rvPoNo;
        this.rvPoNo = rvPoNo;
        changeSupport.firePropertyChange("rvPoNo", oldRvPoNo, rvPoNo);
    }

    public Character getRvDelivery() {
        return rvDelivery;
    }

    public void setRvDelivery(Character rvDelivery) {
        Character oldRvDelivery = this.rvDelivery;
        this.rvDelivery = rvDelivery;
        changeSupport.firePropertyChange("rvDelivery", oldRvDelivery, rvDelivery);
    }

    public Date getRvDelDateFrom() {
        return rvDelDateFrom;
    }

    public void setRvDelDateFrom(Date rvDelDateFrom) {
        Date oldRvDelDateFrom = this.rvDelDateFrom;
        this.rvDelDateFrom = rvDelDateFrom;
        changeSupport.firePropertyChange("rvDelDateFrom", oldRvDelDateFrom, rvDelDateFrom);
    }

    public Date getRvDelDateTo() {
        return rvDelDateTo;
    }

    public void setRvDelDateTo(Date rvDelDateTo) {
        Date oldRvDelDateTo = this.rvDelDateTo;
        this.rvDelDateTo = rvDelDateTo;
        changeSupport.firePropertyChange("rvDelDateTo", oldRvDelDateTo, rvDelDateTo);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (transCoSeq != null ? transCoSeq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ETOoHead)) {
            return false;
        }
        ETOoHead other = (ETOoHead) object;
        if ((this.transCoSeq == null && other.transCoSeq != null) || (this.transCoSeq != null && !this.transCoSeq.equals(other.transCoSeq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "seso.ETOoHead[ transCoSeq=" + transCoSeq + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
